@import "fonts";

:root {
    --gt-background: var(--bs-gray-200);
    --gt-radius-sm: .125rem;
    --gt-radius-mid: .25rem;
    --gt-radius-lg: .375rem;
    --bs-nav-link-font-size: .875rem;
    --bs-modal-padding: 1rem 1.5rem 1.5rem;
    --bs-font-sans-serif: "Comfortaa",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

html:after {
    //content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9;
    pointer-events: none;
    background: url("../image/MulticolorGlows.png") no-repeat top/900px;
}

.ex-d-flex {display: flex;}
.ex-flex-column {flex-direction: column;}
.ex-justify-between {justify-content: space-between;}
.ex-justify-center {justify-content: center;}
.ex-align-center {align-items: center;}
.ex-small {font-size: .75rem}
.ex-detail-w {width: 60rem;margin: auto;}

@mixin ex-d-flex {display: flex;}
@mixin ex-flex-column {flex-direction: column;}
@mixin ex-justify-between {justify-content: space-between;}
@mixin ex-justify-center {justify-content: center;}
@mixin ex-align-center {align-items: center;}
@mixin ex-small {font-size: .75rem}

body {
    background: var(--gt-background);
}
* {
    transition: all .3s;
}
.small, small {
    @extend .ex-small;
}
.alert {
    @extend .ex-small;
    .bi {
        width: 1rem;
        height: 1rem
    }
}
.modal-header {border-bottom: none}
.btn {
    --bs-btn-font-size: .875rem;
    --bs-btn-padding-y: 0.5rem;
    --bs-btn-padding-x: 1rem;
    min-width: 6rem;
}

.num {
    @extend .ex-d-flex;
    @extend .ex-justify-between;
    @extend .ex-small;
    color: var(--bs-gray-500);
    padding: 2px 0;
    span {
        @extend .ex-d-flex;
        @extend .ex-align-center;
        gap: .24rem;
        svg {
            fill: var(--bs-gray-500);
        }
    }
}
.desc {
    line-height: 2;
    @extend .ex-small;
    color: var(--bs-secondary);
    height: 3rem;
    overflow: hidden;
}
.down-table {
    td {padding: .75rem 1.5rem; font-size: 1rem;}
    td:first-child {
        border-top-left-radius: .5rem;
        border-bottom-left-radius: .5rem;
    }
    td:last-child {
        border-top-right-radius: .5rem;
        border-bottom-right-radius: .5rem;
        text-align: right
    }
}


.site-nav{
    padding: .875rem 1rem;
    @extend .ex-d-flex;
    @extend .ex-justify-between;
    @extend .ex-align-center;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--bs-white);
    form {
        width: 25rem;
        @extend .ex-d-flex;
        @extend .ex-align-center;
        background: var(--gt-background);
        border-radius: 10rem;
        padding-left: 1rem;
        input {
            width: 100%;
            flex: 1;
            border: none;
            background: transparent;
            outline: none;
            font-size: .875rem;
            &::placeholder {
                font-size: .875rem;
            }
        }
        button {
            height: 2.25rem;
            width: 3rem;
            @extend .ex-d-flex;
            @extend .ex-align-center;
            @extend .ex-justify-center;
            border: none;
            background: transparent;
        }
    }
    .nav {
        gap: 2.5rem;
        .nav-link {
            color: var(--bs-dark);
            padding-left: 0;
            padding-right: 0;
            position: relative;
            &:hover {
                color: var(--bs-gray-600)
            }
            &.active {
                color: var(--bs-dark);
                font-weight: bold;
                &:after {
                    content: '';
                    width: 1.5rem;
                    height: .25rem;
                    border-radius: 1rem;
                    background: var(--bs-dark);
                    position: absolute;
                    margin-left: 50%;
                    left: -.75rem;
                    bottom: -.25rem;
                }
            }
        }
    }
}
.site-home {
    @extend .ex-d-flex;
    @extend .ex-flex-column;
    gap: 4rem;
    .title {
        @extend .ex-d-flex;
        @extend .ex-justify-between;
        @extend .ex-align-center;
        margin-bottom: 1.5rem;
        h3 {
            margin: 0;
        }
        .nav {
            gap: 1rem;
            .nav-link {
                @extend .ex-small;
                border-radius: 10rem;
                background: var(--bs-white);
                color: var(--bs-dark);
                border: 1px solid var(--bs-gray-300);
                &:hover {
                    background: var(--bs-dark);
                    color: var(--bs-white);
                    box-shadow: 0 0 1rem rgba(0,0,0,.1);
                }
            }
        }
    }
}

.home-carousel {
    .carousel-indicators [data-bs-target] {
        height: 5px;
        width: 1.5rem;
        border-radius: var(--gt-radius-lg);
        border-top: none;
        border-bottom: none;
    }
    .carousel-inner {
        border-radius: var(--gt-radius-lg);
        overflow: hidden;
        box-shadow: 0 0 .625rem rgba(0,0,0,.1);
    }
}
.home-app-topic {
    @extend .ex-d-flex;
    @extend .ex-flex-column;
    gap: .625rem;
    figure {
        background: var(--bs-white);
        margin: 0;
        border-radius: var(--gt-radius-mid);
        overflow: hidden;
        box-shadow: 0 0 .5rem rgba(0,0,0,.1);
        img {
            border-radius: var(--gt-radius-sm);
        }
    }
}
.home-news-topic {
    @extend .ex-d-flex;
    @extend .ex-flex-column;
    gap: .625rem;
    a {
        @extend .ex-d-flex;
        @extend .ex-align-center;
        gap: 1rem;
        padding: .625rem .625rem .625rem 1rem;
        @extend .ex-small;
        color: var(--bs-dark);
        text-decoration: none;
        background: var(--bs-white);
        border-radius: var(--gt-radius-mid);
        line-height: 1.25rem;
        &:hover {
            box-shadow: 0 0 1rem rgba(0,0,0,.1);
        }
        figure {
            width: 5rem;
            margin: 0;
            border-radius: var(--gt-radius-sm);
            overflow: hidden;
        }
        span {
            flex: 1;
        }
    }
}

.app-list {
    .row {
        a {
            @extend .ex-d-flex;
            @extend .ex-flex-column;
            position: relative;
            padding: 2rem 1.5rem 1.5rem;
            gap: 1rem;
            border-radius: var(--gt-radius-lg);
            overflow: hidden;
            color: var(--bs-dark);
            text-decoration: none;
            background: var(--bs-white);
            .icon-arm {
                position: absolute;
                top: 0;
                left: 0;
                width: 6.25rem;
                img {
                    display: block;
                    max-width: 100%;
                    border-bottom-right-radius: var(--gt-radius-lg);
                }
            }
            .atr {
                position: absolute;
                right: 1.5rem;
                @extend .ex-d-flex;
                figure {
                    width: 1.25rem;
                    height: 1.25rem;
                    margin-right: -.25rem;
                    margin-bottom: 0;
                    img {
                        display: block;
                        width: 100%;
                    }
                }
            }
            .photo {
                margin: 0;
            }
            .text {
                line-height: 2;
                @extend .ex-d-flex;
                @extend .ex-flex-column;
                h6 {
                    margin: 0;
                    line-height: 2;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
                small {
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    &:last-child {
                        color: var(--bs-secondary)
                    }
                }
            }
            .btn {
                @extend .ex-small;
                background: var(--gt-background);
                margin-top: 1rem;
                line-height: 1.25rem;
            }
            &:hover {
                box-shadow: 0 0 1rem rgba(0,0,0,.1);
                .btn {
                    background: var(--bs-dark);
                    color: var(--bs-white);
                }
            }
        }
    }
}
.article-list {
    article {
        border-radius: var(--gt-radius-lg);
        background: #fff;
        overflow: hidden;
        @extend .ex-d-flex;
        padding: 1.25rem;
        gap: 1.25rem;
        .photo {
            width: 33.3333333%;
            flex: 0 0 auto;
            img {
                display: block;
                max-width: 100%;
                border-radius: var(--gt-radius-sm);
            }
        }
        .text {
            @extend .ex-d-flex;
            @extend .ex-flex-column;
            gap: .625rem;
            h6 {
                line-height: 1.75rem;
                overflow: hidden;
                margin: 0;
            }
            .desc {
                margin-bottom: auto;
            }
            .num {
                justify-content: left;
                gap: 2rem;
            }
        }
        &:hover {
            box-shadow: 0 0 1rem rgba(0,0,0,.1);
            .btn {
                background: var(--bs-dark);
                color: var(--bs-white);
            }
        }
    }
}

.nav-title {
    padding-top: 4rem;
    padding-bottom: 4rem;
    h1 {margin: 0}
}

.app-filters {
    @extend .ex-d-flex;
    @extend .ex-justify-between;
    padding: 0 0 2rem;
    .nav {
        gap: .5rem;
        .nav-link {
            @extend .ex-small;
            border-radius: 10rem;
            background: var(--bs-white);
            color: var(--bs-dark);
            border: 1px solid var(--bs-gray-300);
            &:hover,&.active {
                background: var(--bs-dark);
                color: var(--bs-white);
                box-shadow: 0 0 1rem rgba(0,0,0,.1);
            }
        }
    }
}
.app-filters-form {
    @extend .ex-d-flex;
    @extend .ex-align-center;
    @extend .ex-small;
    gap: 1rem;

    .form-check {
        margin: 0;
        @extend .ex-d-flex;
        @extend .ex-align-center;
        gap: .5rem;
        padding: 0.5rem 1rem;
        background: var(--bs-white);
        border-radius: 2rem;
        border: 1px solid var(--bs-border-color);
        .form-check-input {
            margin: 0;
            width: 1rem;
            height: 1rem;
        }
        label {
            white-space: nowrap;
        }
    }
    .form-select {
        @extend .ex-small;
        border-radius: 2rem;
        padding: .5rem 2.5rem .5rem 1rem;
    }
}
.detail {
    @extend .ex-d-flex;
    @extend .ex-flex-column;
    gap: 1rem;
    .detail-heard {
        background: var(--bs-white);
        margin-bottom: 2rem;
        .article-inner {
            @extend .ex-d-flex;
            @extend .ex-flex-column;
            @extend .ex-detail-w;
            gap: 1rem;
            text-align: center;
            padding: 4rem 0;
            h2 {margin: 0}
            .num {
                justify-content: center;
                gap: 2rem;
            }
        }
        .app-inner {
            @extend .ex-d-flex;
            @extend .ex-justify-center;
            @extend .ex-detail-w;
            gap: 2rem;
            padding: 4rem 0;
            background: #fff;
            border-radius: .5rem;
            .left {
                flex: 0 0 7rem;
                figure {
                    width: 7rem;
                    img {
                        filter: drop-shadow(0 0 1rem rgba(0,0,0,.1));
                    }
                }
            }
            .right {
                @extend .ex-d-flex;
                @extend .ex-flex-column;
                gap: 2rem;
                .text {
                    @extend .ex-d-flex;
                    @extend .ex-flex-column;
                    gap: 1rem;
                    &>* {margin: 0}
                    h2 {
                        font-size: 1.75rem;
                        line-height: 1;
                        font-weight: bold;
                    }
                    p {
                        line-height: 2;
                        @extend .ex-small;
                        color: var(--bs-gray-600);
                    }
                }
                .app-os-v {
                    @extend .ex-d-flex;
                    gap: .5rem;
                    figure {
                        width: 9rem;
                        height: 1.5rem;
                        margin: 0;
                        &:last-child {width: 7rem}
                    }
                }
                .info {
                    @extend .ex-d-flex;
                    gap: 2rem;
                    border-color: var(--bs-border-color);
                    p {
                        @extend .ex-d-flex;
                        @extend .ex-align-center;
                        gap: .5rem;
                        color: var(--bs-gray-500);
                        margin: 0;
                        span {
                            font-size: 1rem;
                            font-weight: 600;
                            color: var(--bs-dark);
                        }
                    }
                }
                .button-group {
                    @extend .ex-d-flex;
                    gap: 1rem;
                    .btn {
                        @extend .ex-small;
                        @extend .ex-d-flex;
                        @extend .ex-align-center;
                        @extend .ex-justify-center;
                        flex:0 0 12rem;
                        gap: .5rem;
                        padding: .5rem;
                        border-radius: 5rem;
                        box-shadow: 0 0 .5rem rgba(0, 0, 0, .1);
                    }
                }
            }
        }
    }
    .detail-content {
        @extend .ex-detail-w;
        padding: 3rem;
        background: #fff;
        border-radius: .5rem;
        line-height: 2;
        h4 {
            font-size: 1.25rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--bs-gray-200);
            margin-bottom: 2rem;
        }
        .app-screenshot {
            @extend .ex-d-flex;
            gap: 1rem;
            border-radius: var(--gt-radius-lg);
            overflow-x: auto;
            figure {
                flex: 0 0 auto;
                border-radius: var(--gt-radius-lg);
                overflow: hidden;
                margin: 0;
                img {
                    height: 20rem;
                    width: auto;
                }
            }
        }
    }
    .detail-version {
        @extend .detail-content;
        .down-table td {font-weight: bold}
    }

}

.find-resources {
    padding: 5rem 0;
    background: #fff;
    border-radius: .5rem;
    form {
        max-width: 40rem;
        margin: auto;
    }
    .col-form-label {
        font-size: .875rem;
    }
    .form-control {
        padding: .75rem 1rem;
        &,&::placeholder {
            font-size: .875rem;
        }
        &::placeholder {
            color: var(--bs-gray-400);
        }
    }
}

.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background: var(--bs-dark);
    color: var(--bs-white);
    .container {
        @extend .ex-d-flex;
        @extend .ex-flex-column;
        @extend .ex-align-center;
        .nav {
            .nav-link {color: var(--bs-white)}
        }
        .logo {
            margin-top: 1.5rem;
            margin-bottom: 1.5rem;
        }
        p {
            @extend .ex-d-flex;
            @extend .ex-align-center;
            opacity: .5;
            gap: .5rem;
            margin-bottom: .5rem;
            font-size: .875rem;
        }
    }
}